home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 12 - 1996 / 12.04 Apr 96 / ThreadingAppleEvents.sit / ThreadingAppleEvents / Grant's CGI Code 1.0b13 / MyConfiguration.h < prev    next >
MacBinary  |  1996-01-26  |  7.6 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Fri Jan 26 02:34:49 1996, modified Fri Jan 26 02:34:49 1996, creator 'CWIE', type ASCII, 7093 bytes "MyConfiguration.h" , at 0x1c35 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 11 4d 79 43 6f 6e 66 | 69 67 75 72 61 74 69 6f |..MyConf|iguratio|
|00000010| 6e 2e 68 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |n.h.....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 00 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 1b b5 00 | 00 01 9a ad 2e 34 99 ad |........|.....4..|
|00000060| 2e 34 99 00 00 06 00 00 | 00 00 00 00 00 00 00 00 |.4......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 8d 74 00 00 |........|.....t..|
|00000080| 23 70 72 61 67 6d 61 20 | 6f 6e 63 65 0d 2f 2a 2a |#pragma |once./**|
|00000090| 2a 2a 2a 0d 20 2a 0d 20 | 2a 09 4d 79 43 6f 6e 66 |***. *. |*.MyConf|
|000000a0| 69 67 75 72 61 74 69 6f | 6e 2e 68 0d 20 2a 0d 20 |iguratio|n.h. *. |
|000000b0| 2a 09 59 6f 75 20 77 69 | 6c 6c 20 77 61 6e 74 20 |*.You wi|ll want |
|000000c0| 74 6f 20 6d 6f 64 69 66 | 79 20 74 68 65 20 63 6f |to modif|y the co|
|000000d0| 6e 73 74 61 6e 74 73 20 | 69 6e 20 74 68 69 73 20 |nstants |in this |
|000000e0| 68 65 61 64 65 72 20 66 | 69 6c 65 20 74 6f 0d 20 |header f|ile to. |
|000000f0| 2a 09 73 65 74 20 74 68 | 65 20 63 6f 64 65 20 74 |*.set th|e code t|
|00000100| 6f 20 63 6f 6d 70 69 6c | 65 20 77 69 74 68 20 74 |o compil|e with t|
|00000110| 68 65 20 70 61 72 74 69 | 63 75 6c 61 72 20 6f 70 |he parti|cular op|
|00000120| 74 69 6f 6e 73 20 79 6f | 75 20 77 61 6e 74 2e 0d |tions yo|u want..|
|00000130| 20 2a 09 55 73 65 20 31 | 20 28 6f 6e 65 29 20 74 | *.Use 1| (one) t|
|00000140| 6f 20 74 75 72 6e 20 61 | 6e 20 6f 70 74 69 6f 6e |o turn a|n option|
|00000150| 20 6f 6e 2c 20 30 20 28 | 7a 65 72 6f 29 20 74 6f | on, 0 (|zero) to|
|00000160| 20 74 75 72 6e 20 69 74 | 20 6f 66 66 2e 0d 20 2a | turn it| off.. *|
|00000170| 0d 20 2a 09 49 27 76 65 | 20 6d 61 72 6b 65 64 20 |. *.I've| marked |
|00000180| 72 65 63 65 6e 74 20 61 | 64 64 69 74 69 6f 6e 73 |recent a|dditions|
|00000190| 20 74 6f 20 74 68 69 73 | 20 66 69 6c 65 20 77 69 | to this| file wi|
|000001a0| 74 68 0d 20 2a 09 09 a5 | 6e 65 77 a5 0d 20 2a 09 |th. *...|new.. *.|
|000001b0| 69 6e 20 61 20 63 6f 6d | 6d 65 6e 74 2e 0d 20 2a |in a com|ment.. *|
|000001c0| 0d 20 2a 09 54 68 69 73 | 20 69 73 20 61 20 73 75 |. *.This| is a su|
|000001d0| 70 70 6f 72 74 20 66 69 | 6c 65 20 66 6f 72 20 22 |pport fi|le for "|
|000001e0| 47 72 61 6e 74 27 73 20 | 43 47 49 20 46 72 61 6d |Grant's |CGI Fram|
|000001f0| 65 77 6f 72 6b 22 2e 0d | 20 2a 09 50 6c 65 61 73 |ework"..| *.Pleas|
|00000200| 65 20 73 65 65 20 74 68 | 65 20 6c 69 63 65 6e 73 |e see th|e licens|
|00000210| 65 20 61 67 72 65 65 6d | 65 6e 74 20 74 68 61 74 |e agreem|ent that|
|00000220| 20 61 63 63 6f 6d 70 61 | 6e 69 65 73 20 74 68 65 | accompa|nies the|
|00000230| 20 64 69 73 74 72 69 62 | 75 74 69 6f 6e 20 70 61 | distrib|ution pa|
|00000240| 63 6b 61 67 65 0d 20 2a | 09 66 6f 72 20 6c 69 63 |ckage. *|.for lic|
|00000250| 65 6e 73 69 6e 67 20 64 | 65 74 61 69 6c 73 2e 0d |ensing d|etails..|
|00000260| 20 2a 0d 20 2a 09 43 6f | 70 79 72 69 67 68 74 20 | *. *.Co|pyright |
|00000270| a9 31 39 39 35 20 62 79 | 20 47 72 61 6e 74 20 4e |.1995 by| Grant N|
|00000280| 65 75 66 65 6c 64 0d 20 | 2a 09 67 72 61 6e 74 40 |eufeld. |*.grant@|
|00000290| 61 63 6d 2e 63 6f 6d 0d | 20 2a 09 68 74 74 70 3a |acm.com.| *.http:|
|000002a0| 2f 2f 61 72 70 70 31 2e | 63 61 72 6c 65 74 6f 6e |//arpp1.|carleton|
|000002b0| 2e 63 61 2f 67 72 61 6e | 74 2f 0d 20 2a 0d 20 2a |.ca/gran|t/. *. *|
|000002c0| 2a 2a 2a 2a 2f 0d 0d 23 | 69 6e 63 6c 75 64 65 20 |****/..#|include |
|000002d0| 22 63 6f 6e 73 74 61 6e | 74 73 2e 68 22 0d 0d 0d |"constan|ts.h"...|
|000002e0| 2f 2a 2a 2a 20 20 43 4f | 4e 53 54 41 4e 54 20 44 |/*** CO|NSTANT D|
|000002f0| 45 43 4c 41 52 41 54 49 | 4f 4e 53 20 20 2a 2a 2a |ECLARATI|ONS ***|
|00000300| 2f 0d 0d 2f 2a 2a 20 20 | 54 68 72 65 61 64 73 20 |/../** |Threads |
|00000310| 20 2a 2a 2f 0d 0d 2f 2a | 20 69 66 20 6f 66 66 2c | **/../*| if off,|
|00000320| 20 74 68 65 20 74 68 72 | 65 61 64 20 6d 61 6e 61 | the thr|ead mana|
|00000330| 67 65 72 20 6d 75 73 74 | 20 62 65 20 70 72 65 73 |ger must| be pres|
|00000340| 65 6e 74 20 66 6f 72 20 | 74 68 65 20 61 70 70 20 |ent for |the app |
|00000350| 74 6f 20 72 75 6e 20 2a | 2f 0d 23 64 65 66 69 6e |to run *|/.#defin|
|00000360| 65 20 6b 43 6f 6d 70 69 | 6c 65 57 69 74 68 54 68 |e kCompi|leWithTh|
|00000370| 72 65 61 64 73 4f 70 74 | 69 6f 6e 61 6c 09 09 31 |readsOpt|ional..1|
|00000380| 0d 2f 2a 20 69 66 20 6f | 6e 2c 20 61 6c 6c 20 41 |./* if o|n, all A|
|00000390| 70 70 6c 65 20 45 76 65 | 6e 74 73 20 28 69 6e 63 |pple Eve|nts (inc|
|000003a0| 6c 75 64 69 6e 67 20 74 | 68 65 20 43 47 49 20 73 |luding t|he CGI s|
|000003b0| 64 6f 63 20 65 76 65 6e | 74 29 20 77 69 6c 6c 20 |doc even|t) will |
|000003c0| 62 65 0d 09 73 70 61 77 | 6e 65 64 20 6f 66 66 20 |be..spaw|ned off |
|000003d0| 61 73 20 73 65 70 61 72 | 61 74 65 20 74 68 72 65 |as separ|ate thre|
|000003e0| 61 64 73 2e 20 49 66 20 | 6f 66 66 2c 20 79 6f 75 |ads. If |off, you|
|000003f0| 20 61 72 65 20 6f 6e 20 | 79 6f 75 72 20 6f 77 6e | are on |your own|
|00000400| 20 66 6f 72 0d 09 74 68 | 72 65 61 64 69 6e 67 20 | for..th|reading |
|00000410| 74 68 65 20 43 47 49 20 | 65 76 65 6e 74 73 2e 20 |the CGI |events. |
|00000420| 2a 2f 0d 23 64 65 66 69 | 6e 65 20 6b 43 6f 6d 70 |*/.#defi|ne kComp|
|00000430| 69 6c 65 57 69 74 68 54 | 68 72 65 61 64 65 64 41 |ileWithT|hreadedA|
|00000440| 70 70 6c 65 45 76 65 6e | 74 73 09 31 0d 2f 2a 20 |ppleEven|ts.1./* |
|00000450| a5 6e 65 77 a5 20 6e 75 | 6d 62 65 72 20 6f 66 20 |.new. nu|mber of |
|00000460| 74 68 72 65 61 64 73 20 | 74 6f 20 70 72 65 61 6c |threads |to preal|
|00000470| 6c 6f 63 61 74 65 3b 20 | 75 73 65 64 20 62 79 20 |locate; |used by |
|00000480| 73 74 61 72 74 75 70 54 | 68 72 65 61 64 73 2e 0d |startupT|hreads..|
|00000490| 09 49 66 20 79 6f 75 27 | 76 65 20 74 75 72 6e 65 |.If you'|ve turne|
|000004a0| 64 20 6f 66 66 20 6b 43 | 6f 6d 70 69 6c 65 57 69 |d off kC|ompileWi|
|000004b0| 74 68 54 68 72 65 61 64 | 65 64 41 70 70 6c 65 45 |thThread|edAppleE|
|000004c0| 76 65 6e 74 73 20 61 6e | 64 20 6d 61 6b 65 20 6e |vents an|d make n|
|000004d0| 6f 0d 09 63 61 6c 6c 73 | 20 74 6f 20 74 68 65 20 |o..calls| to the |
|000004e0| 4d 79 4e 65 77 54 68 72 | 65 61 64 46 72 6f 6d 50 |MyNewThr|eadFromP|
|000004f0| 6f 6f 6c 20 66 75 6e 63 | 74 69 6f 6e 2c 20 79 6f |ool func|tion, yo|
|00000500| 75 27 6c 6c 20 70 72 6f | 62 61 62 6c 79 20 77 61 |u'll pro|bably wa|
|00000510| 6e 74 20 74 6f 0d 09 73 | 65 74 20 74 68 69 73 20 |nt to..s|et this |
|00000520| 74 6f 20 7a 65 72 6f 20 | 2a 2f 0d 23 64 65 66 69 |to zero |*/.#defi|
|00000530| 6e 65 20 6b 53 74 61 72 | 74 75 70 54 68 72 65 61 |ne kStar|tupThrea|
|00000540| 64 73 50 72 65 61 6c 6c | 6f 63 61 74 65 09 09 35 |dsPreall|ocate..5|
|00000550| 0d 0d 0d 2f 2a 2a 20 20 | 51 75 69 74 74 69 6e 67 |.../** |Quitting|
|00000560| 20 20 2a 2a 2f 0d 0d 2f | 2a 20 69 66 20 6f 6e 2c | **/../|* if on,|
|00000570| 20 61 70 70 20 77 69 6c | 6c 20 74 72 79 20 74 6f | app wil|l try to|
|00000580| 20 71 75 69 74 20 61 66 | 74 65 72 20 61 20 73 65 | quit af|ter a se|
|00000590| 74 20 74 69 6d 65 20 6f | 66 20 69 64 6c 69 6e 67 |t time o|f idling|
|000005a0| 20 2a 2f 0d 23 64 65 66 | 69 6e 65 20 6b 43 6f 6d | */.#def|ine kCom|
|000005b0| 70 69 6c 65 57 69 74 68 | 51 75 69 74 4f 6e 4c 6f |pileWith|QuitOnLo|
|000005c0| 6e 67 49 64 6c 65 09 09 | 31 0d 2f 2a 20 a5 6e 65 |ngIdle..|1./* .ne|
|000005d0| 77 a5 20 74 68 65 20 61 | 6d 6f 75 6e 74 20 6f 66 |w. the a|mount of|
|000005e0| 20 69 64 6c 65 20 74 69 | 6d 65 2c 20 69 6e 20 74 | idle ti|me, in t|
|000005f0| 69 63 6b 73 20 28 36 30 | 74 68 73 20 6f 66 20 61 |icks (60|ths of a|
|00000600| 20 73 65 63 6f 6e 64 29 | 2c 20 62 65 66 6f 72 65 | second)|, before|
|00000610| 0d 09 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |..the ap|plicatio|
|00000620| 6e 20 73 65 6c 66 20 71 | 75 69 74 73 2e 20 36 30 |n self q|uits. 60|
|00000630| 2a 36 30 20 69 73 20 6f | 6e 65 20 6d 69 6e 75 74 |*60 is o|ne minut|
|00000640| 65 20 69 6e 20 74 69 63 | 6b 73 2e 20 2a 2f 0d 23 |e in tic|ks. */.#|
|00000650| 64 65 66 69 6e 65 20 6b | 49 64 6c 65 54 69 6d 65 |define k|IdleTime|
|00000660| 54 6f 51 75 69 74 09 09 | 09 09 09 28 35 20 2a 20 |ToQuit..|...(5 * |
|00000670| 6b 4f 6e 65 4d 69 6e 75 | 74 65 49 6e 54 69 63 6b |kOneMinu|teInTick|
|00000680| 73 29 0d 2f 2a 20 69 66 | 20 6f 6e 2c 20 61 70 70 |s)./* if| on, app|
|00000690| 20 77 69 6c 6c 20 6e 6f | 74 20 71 75 69 74 20 6f | will no|t quit o|
|000006a0| 6e 20 69 64 6c 65 20 69 | 66 20 69 74 20 77 61 73 |n idle i|f it was|
|000006b0| 20 6f 70 65 6e 65 64 20 | 77 69 74 68 20 6e 6f 20 | opened |with no |
|000006c0| 73 70 65 63 69 61 6c 0d | 09 65 76 65 6e 74 20 2d |special.|.event -|
|000006d0| 20 73 74 61 72 74 73 20 | 6f 66 66 20 62 79 20 72 | starts |off by r|
|000006e0| 65 63 65 69 76 69 6e 67 | 20 61 6e 20 4f 70 65 6e |eceiving| an Open|
|000006f0| 41 70 70 6c 69 63 61 74 | 69 6f 6e 20 41 70 70 6c |Applicat|ion Appl|
|00000700| 65 45 76 65 6e 74 20 2a | 2f 0d 23 64 65 66 69 6e |eEvent *|/.#defin|
|00000710| 65 20 6b 43 6f 6d 70 69 | 6c 65 57 69 74 68 49 64 |e kCompi|leWithId|
|00000720| 6c 65 51 75 69 74 4f 6e | 4f 70 65 6e 41 70 70 09 |leQuitOn|OpenApp.|
|00000730| 31 0d 2f 2a 20 69 66 20 | 6d 65 6d 6f 72 79 20 67 |1./* if |memory g|
|00000740| 65 74 73 20 27 70 72 65 | 63 61 72 69 6f 75 73 6c |ets 'pre|cariousl|
|00000750| 79 27 20 6c 6f 77 2c 20 | 74 68 65 20 61 70 70 6c |y' low, |the appl|
|00000760| 69 63 61 74 69 6f 6e 20 | 77 69 6c 6c 20 62 65 20 |ication |will be |
|00000770| 73 65 74 20 74 6f 20 71 | 75 69 74 2e 0d 09 54 68 |set to q|uit...Th|
|00000780| 69 73 20 5f 6d 61 79 5f | 20 28 6e 6f 74 65 3a 20 |is _may_| (note: |
|00000790| 75 6e 74 65 73 74 65 64 | 29 20 73 70 65 65 64 20 |untested|) speed |
|000007a0| 75 70 20 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |up the a|pplicati|
|000007b0| 6f 6e 2e 20 4e 65 65 64 | 73 20 70 72 6f 66 69 6c |on. Need|s profil|
|000007c0| 69 6e 67 20 2a 2f 0d 23 | 64 65 66 69 6e 65 20 6b |ing */.#|define k|
|000007d0| 43 6f 6d 70 69 6c 65 57 | 69 74 68 51 75 69 74 4f |CompileW|ithQuitO|
|000007e0| 6e 4c 6f 77 4d 65 6d 6f | 72 79 09 09 31 0d 0d 0d |nLowMemo|ry..1...|
|000007f0| 2f 2a 2a 20 20 4d 6f 64 | 75 6c 65 73 20 20 28 43 |/** Mod|ules (C|
|00000800| 47 49 2f 4c 69 73 74 53 | 54 41 52 29 20 20 2a 2a |GI/ListS|TAR) **|
|00000810| 2f 0d 0d 2f 2a 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |/../* th|e follow|
|00000820| 69 6e 67 20 64 65 74 65 | 72 6d 69 6e 65 20 77 68 |ing dete|rmine wh|
|00000830| 69 63 68 20 6d 6f 64 75 | 6c 65 73 20 61 72 65 20 |ich modu|les are |
|00000840| 63 6f 6d 70 69 6c 65 64 | 20 2a 2f 0d 2f 2a 20 43 |compiled| */./* C|
|00000850| 47 49 20 2a 2f 0d 23 64 | 65 66 69 6e 65 20 6b 43 |GI */.#d|efine kC|
|00000860| 6f 6d 70 69 6c 65 57 69 | 74 68 43 47 49 43 6f 64 |ompileWi|thCGICod|
|00000870| 65 09 09 09 09 31 0d 2f | 2a 20 4c 69 73 74 53 54 |e....1./|* ListST|
|00000880| 41 52 20 2a 2f 0d 23 64 | 65 66 69 6e 65 20 6b 43 |AR */.#d|efine kC|
|00000890| 6f 6d 70 69 6c 65 57 69 | 74 68 4c 69 73 74 53 54 |ompileWi|thListST|
|000008a0| 41 52 43 6f 64 65 09 09 | 30 0d 0d 0d 2f 2a 2a 20 |ARCode..|0.../** |
|000008b0| 20 43 47 49 20 53 75 70 | 70 6f 72 74 20 20 2a 2a | CGI Sup|port **|
|000008c0| 2f 0d 0d 2f 2a 20 53 65 | 6e 64 2d 70 61 72 74 69 |/../* Se|nd-parti|
|000008d0| 61 6c 20 65 76 65 6e 74 | 20 73 75 70 70 6f 72 74 |al event| support|
|000008e0| 20 28 43 47 49 41 45 53 | 65 6e 64 50 61 72 74 69 | (CGIAES|endParti|
|000008f0| 61 6c 29 2e 0d 09 41 6c | 73 6f 20 69 6e 63 6c 75 |al)...Al|so inclu|
|00000900| 64 65 73 20 74 68 65 20 | 63 6f 6e 6e 65 63 74 69 |des the |connecti|
|00000910| 6f 6e 20 66 69 65 6c 64 | 20 6f 66 20 74 68 65 20 |on field| of the |
|00000920| 43 47 49 52 65 63 6f 72 | 64 2e 20 2a 2f 0d 23 64 |CGIRecor|d. */.#d|
|00000930| 65 66 69 6e 65 20 6b 43 | 6f 6d 70 69 6c 65 57 69 |efine kC|ompileWi|
|00000940| 74 68 43 47 49 53 65 6e | 64 50 61 72 74 69 61 6c |thCGISen|dPartial|
|00000950| 09 09 31 0d 2f 2a 20 46 | 6f 72 6d 20 68 61 6e 64 |..1./* F|orm hand|
|00000960| 6c 69 6e 67 20 63 6f 64 | 65 20 28 61 6c 6c 20 74 |ling cod|e (all t|
|00000970| 68 65 20 43 47 49 46 6f | 72 6d 46 69 65 6c 64 73 |he CGIFo|rmFields|
|00000980| 2e 2e 2e 20 66 75 6e 63 | 74 69 6f 6e 73 29 2e 0d |... func|tions)..|
|00000990| 09 49 66 20 79 6f 75 20 | 74 75 72 6e 20 74 68 69 |.If you |turn thi|
|000009a0| 73 20 6f 66 66 2c 20 74 | 68 65 20 66 6f 72 6d 46 |s off, t|he formF|
|000009b0| 69 65 6c 64 73 20 61 6e | 64 20 74 6f 74 61 6c 46 |ields an|d totalF|
|000009c0| 69 65 6c 64 73 20 77 69 | 6c 6c 20 6e 6f 74 0d 09 |ields wi|ll not..|
|000009d0| 62 65 20 61 76 61 69 6c | 61 62 6c 65 20 69 6e 20 |be avail|able in |
|000009e0| 74 68 65 20 43 47 49 48 | 61 6e 64 6c 65 73 2e 20 |the CGIH|andles. |
|000009f0| 2a 2f 0d 23 64 65 66 69 | 6e 65 20 6b 43 6f 6d 70 |*/.#defi|ne kComp|
|00000a00| 69 6c 65 57 69 74 68 43 | 47 49 46 6f 72 6d 48 61 |ileWithC|GIFormHa|
|00000a10| 6e 64 6c 69 6e 67 09 09 | 31 0d 2f 2a 20 61 75 74 |ndling..|1./* aut|
|00000a20| 6f 6d 61 74 69 63 61 6c | 6c 79 20 66 6f 72 6d 61 |omatical|ly forma|
|00000a30| 74 20 66 6f 72 6d 20 64 | 61 74 61 20 62 65 66 6f |t form d|ata befo|
|00000a40| 72 65 20 63 61 6c 6c 69 | 6e 67 20 4d 79 43 47 49 |re calli|ng MyCGI|
|00000a50| 50 72 6f 63 65 73 73 2e | 20 2a 2f 0d 23 64 65 66 |Process.| */.#def|
|00000a60| 69 6e 65 20 6b 43 6f 6d | 70 69 6c 65 57 69 74 68 |ine kCom|pileWith|
|00000a70| 43 47 49 46 6f 72 6d 41 | 75 74 6f 50 72 6f 63 65 |CGIFormA|utoProce|
|00000a80| 73 73 09 31 0d 2f 2a 20 | 61 75 74 6f 6d 61 74 69 |ss.1./* |automati|
|00000a90| 63 61 6c 6c 79 20 64 65 | 63 6f 64 65 20 70 61 72 |cally de|code par|
|00000aa0| 61 6d 65 74 65 72 73 20 | 28 63 6f 6e 76 65 72 74 |ameters |(convert|
|00000ab0| 20 25 78 78 20 76 61 6c | 75 65 73 2c 20 61 6e 64 | %xx val|ues, and|
|00000ac0| 20 73 70 65 63 69 61 6c | 20 63 68 61 72 73 29 0d | special| chars).|
|00000ad0| 09 50 61 72 61 6d 65 74 | 65 72 73 20 61 66 66 65 |.Paramet|ers affe|
|00000ae0| 63 74 65 64 3a 20 70 61 | 74 68 5f 61 72 67 73 2c |cted: pa|th_args,|
|00000af0| 20 68 74 74 70 5f 73 65 | 61 72 63 68 5f 61 72 67 | http_se|arch_arg|
|00000b00| 73 20 2a 2f 0d 23 64 65 | 66 69 6e 65 20 6b 43 6f |s */.#de|fine kCo|
|00000b10| 6d 70 69 6c 65 57 69 74 | 68 43 47 49 41 75 74 6f |mpileWit|hCGIAuto|
|00000b20| 44 65 63 6f 64 65 09 09 | 31 0d 2f 2a 20 a5 6e 65 |Decode..|1./* .ne|
|00000b30| 77 a5 20 55 73 65 64 20 | 66 6f 72 20 62 61 63 6b |w. Used |for back|
|00000b40| 77 61 72 64 73 20 63 6f | 6d 70 61 74 69 62 69 6c |wards co|mpatibil|
|00000b50| 69 74 79 20 2d 20 69 66 | 20 79 6f 75 20 68 61 76 |ity - if| you hav|
|00000b60| 65 20 6f 6c 64 20 63 6f | 64 65 20 74 68 61 74 0d |e old co|de that.|
|00000b70| 09 75 73 65 73 20 74 68 | 65 20 72 65 73 70 6f 6e |.uses th|e respon|
|00000b80| 73 65 44 61 74 61 20 66 | 69 65 6c 64 20 6f 66 20 |seData f|ield of |
|00000b90| 74 68 65 20 43 47 49 52 | 65 63 6f 72 64 20 28 43 |the CGIR|ecord (C|
|00000ba0| 47 49 48 64 6c 29 20 73 | 74 72 75 63 74 75 72 65 |GIHdl) s|tructure|
|00000bb0| 20 61 73 0d 09 61 20 27 | 63 68 61 72 20 2a 27 2c | as..a '|char *',|
|00000bc0| 20 74 75 72 6e 20 6f 66 | 66 20 74 68 69 73 20 66 | turn of|f this f|
|00000bd0| 6c 61 67 20 28 73 65 74 | 20 74 6f 20 7a 65 72 6f |lag (set| to zero|
|00000be0| 29 2e 20 4f 74 68 65 72 | 77 69 73 65 2c 20 6a 75 |). Other|wise, ju|
|00000bf0| 73 74 20 6c 65 61 76 65 | 0d 09 69 74 20 6f 6e 20 |st leave|..it on |
|00000c00| 28 73 65 74 20 74 6f 20 | 31 29 2e 20 49 66 20 79 |(set to |1). If y|
|00000c10| 6f 75 20 75 70 64 61 74 | 65 20 79 6f 75 72 20 6f |ou updat|e your o|
|00000c20| 6c 64 20 63 6f 64 65 20 | 74 6f 20 75 73 65 20 72 |ld code |to use r|
|00000c30| 65 73 70 6f 6e 73 65 44 | 61 74 61 20 61 73 0d 09 |esponseD|ata as..|
|00000c40| 61 20 48 61 6e 64 6c 65 | 2c 20 74 68 65 6e 20 73 |a Handle|, then s|
|00000c50| 65 74 20 74 68 69 73 20 | 6f 6e 2e 20 2a 2f 0d 23 |et this |on. */.#|
|00000c60| 64 65 66 69 6e 65 20 6b | 43 6f 6d 70 69 6c 65 57 |define k|CompileW|
|00000c70| 69 74 68 43 47 49 52 65 | 73 70 6f 6e 73 65 44 61 |ithCGIRe|sponseDa|
|00000c80| 74 61 41 73 48 61 6e 64 | 6c 65 09 31 0d 0d 2f 2a |taAsHand|le.1../*|
|00000c90| 20 73 75 70 70 6f 72 74 | 20 75 73 65 20 61 73 20 | support| use as |
|00000ca0| 61 20 75 73 65 72 20 64 | 65 66 69 6e 65 64 20 61 |a user d|efined a|
|00000cb0| 63 74 69 6f 6e 20 2a 2f | 0d 23 64 65 66 69 6e 65 |ction */|.#define|
|00000cc0| 20 6b 43 6f 6d 70 69 6c | 65 57 69 74 68 43 47 49 | kCompil|eWithCGI|
|00000cd0| 41 63 74 69 6f 6e 53 75 | 70 70 6f 72 74 09 31 0d |ActionSu|pport.1.|
|00000ce0| 0d 2f 2a 2a 20 20 43 47 | 49 20 50 61 72 61 6d 65 |./** CG|I Parame|
|00000cf0| 74 65 72 73 20 20 2a 2a | 2f 0d 0d 2f 2a 20 a5 6e |ters **|/../* .n|
|00000d00| 65 77 a5 20 49 66 20 79 | 6f 75 20 77 61 6e 74 20 |ew. If y|ou want |
|00000d10| 74 6f 20 6c 69 6e 6b 20 | 79 6f 75 72 20 6f 77 6e |to link |your own|
|00000d20| 20 64 61 74 61 20 69 6e | 74 6f 20 74 68 65 20 43 | data in|to the C|
|00000d30| 47 49 48 64 6c 2c 20 75 | 73 65 20 74 68 65 0d 09 |GIHdl, u|se the..|
|00000d40| 27 72 65 66 43 6f 6e 27 | 20 66 69 65 6c 64 20 28 |'refCon'| field (|
|00000d50| 61 20 6c 6f 6e 67 20 76 | 61 6c 75 65 29 20 74 6f |a long v|alue) to|
|00000d60| 20 73 74 6f 72 65 20 63 | 75 73 74 6f 6d 20 64 61 | store c|ustom da|
|00000d70| 74 61 2e 20 2a 2f 0d 23 | 64 65 66 69 6e 65 20 6b |ta. */.#|define k|
|00000d80| 43 6f 6d 70 69 6c 65 57 | 69 74 68 43 47 49 52 65 |CompileW|ithCGIRe|
|00000d90| 66 43 6f 6e 09 09 09 31 | 0d 0d 2f 2a 20 27 2d 2d |fCon...1|../* '--|
|00000da0| 2d 2d 27 20 70 61 74 68 | 5f 61 72 67 73 09 09 09 |--' path|_args...|
|00000db0| 2a 2f 0d 23 64 65 66 69 | 6e 65 20 6b 43 6f 6d 70 |*/.#defi|ne kComp|
|00000dc0| 69 6c 65 57 69 74 68 43 | 47 49 70 61 74 68 5f 61 |ileWithC|GIpath_a|
|00000dd0| 72 67 73 09 09 31 0d 2f | 2a 20 27 6b 66 6f 72 27 |rgs..1./|* 'kfor'|
|00000de0| 20 68 74 74 70 5f 73 65 | 61 72 63 68 5f 61 72 67 | http_se|arch_arg|
|00000df0| 73 09 2a 2f 0d 23 64 65 | 66 69 6e 65 20 6b 43 6f |s.*/.#de|fine kCo|
|00000e00| 6d 70 69 6c 65 57 69 74 | 68 43 47 49 68 74 74 70 |mpileWit|hCGIhttp|
|00000e10| 5f 73 65 61 72 63 68 5f | 61 72 67 73 09 31 0d 2f |_search_|args.1./|
|00000e20| 2a 20 27 75 73 65 72 27 | 20 75 73 65 72 6e 61 6d |* 'user'| usernam|
|00000e30| 65 09 09 09 2a 2f 0d 23 | 64 65 66 69 6e 65 20 6b |e...*/.#|define k|
|00000e40| 43 6f 6d 70 69 6c 65 57 | 69 74 68 43 47 49 75 73 |CompileW|ithCGIus|
|00000e50| 65 72 6e 61 6d 65 09 09 | 09 31 0d 2f 2a 20 27 70 |ername..|.1./* 'p|
|00000e60| 61 73 73 27 20 70 61 73 | 73 77 6f 72 64 09 09 09 |ass' pas|sword...|
|00000e70| 2a 2f 0d 23 64 65 66 69 | 6e 65 20 6b 43 6f 6d 70 |*/.#defi|ne kComp|
|00000e80| 69 6c 65 57 69 74 68 43 | 47 49 70 61 73 73 77 6f |ileWithC|GIpasswo|
|00000e90| 72 64 09 09 09 31 0d 2f | 2a 20 27 66 72 6d 75 27 |rd...1./|* 'frmu'|
|00000ea0| 20 66 72 6f 6d 5f 75 73 | 65 72 09 09 09 2a 2f 0d | from_us|er...*/.|
|00000eb0| 23 64 65 66 69 6e 65 20 | 6b 43 6f 6d 70 69 6c 65 |#define |kCompile|
|00000ec0| 57 69 74 68 43 47 49 66 | 72 6f 6d 5f 75 73 65 72 |WithCGIf|rom_user|
|00000ed0| 09 09 31 0d 2f 2a 20 27 | 61 64 64 72 27 20 63 6c |..1./* '|addr' cl|
|00000ee0| 69 65 6e 74 5f 61 64 64 | 72 65 73 73 09 2a 2f 0d |ient_add|ress.*/.|
|00000ef0| 23 64 65 66 69 6e 65 20 | 6b 43 6f 6d 70 69 6c 65 |#define |kCompile|
|00000f00| 57 69 74 68 43 47 49 63 | 6c 69 65 6e 74 5f 61 64 |WithCGIc|lient_ad|
|00000f10| 64 72 65 73 73 09 31 0d | 2f 2a 20 27 70 6f 73 74 |dress.1.|/* 'post|
|00000f20| 27 20 70 6f 73 74 5f 61 | 72 67 73 09 09 09 2a 2f |' post_a|rgs...*/|
|00000f30| 0d 23 64 65 66 69 6e 65 | 20 6b 43 6f 6d 70 69 6c |.#define| kCompil|
|00000f40| 65 57 69 74 68 43 47 49 | 70 6f 73 74 5f 61 72 67 |eWithCGI|post_arg|
|00000f50| 73 09 09 31 0d 2f 2a 20 | 27 6d 65 74 68 27 20 6d |s..1./* |'meth' m|
|00000f60| 65 74 68 6f 64 09 09 09 | 2a 2f 0d 23 64 65 66 69 |ethod...|*/.#defi|
|00000f70| 6e 65 20 6b 43 6f 6d 70 | 69 6c 65 57 69 74 68 43 |ne kComp|ileWithC|
|00000f80| 47 49 6d 65 74 68 6f 64 | 09 09 09 31 0d 2f 2a 20 |GImethod|...1./* |
|00000f90| 27 73 76 6e 6d 27 20 73 | 65 72 76 65 72 5f 6e 61 |'svnm' s|erver_na|
|00000fa0| 6d 65 09 09 2a 2f 0d 23 | 64 65 66 69 6e 65 20 6b |me..*/.#|define k|
|00000fb0| 43 6f 6d 70 69 6c 65 57 | 69 74 68 43 47 49 73 65 |CompileW|ithCGIse|
|00000fc0| 72 76 65 72 5f 6e 61 6d | 65 09 09 31 0d 2f 2a 20 |rver_nam|e..1./* |
|00000fd0| 27 73 76 70 74 27 20 73 | 65 72 76 65 72 5f 70 6f |'svpt' s|erver_po|
|00000fe0| 72 74 09 09 2a 2f 0d 23 | 64 65 66 69 6e 65 20 6b |rt..*/.#|define k|
|00000ff0| 43 6f 6d 70 69 6c 65 57 | 69 74 68 43 47 49 73 65 |CompileW|ithCGIse|
|00001000| 72 76 65 72 5f 70 6f 72 | 74 09 09 31 0d 2f 2a 20 |rver_por|t..1./* |
|00001010| 27 73 63 6e 6d 27 20 73 | 63 72 69 70 74 5f 6e 61 |'scnm' s|cript_na|
|00001020| 6d 65 09 09 2a 2f 0d 23 | 64 65 66 69 6e 65 20 6b |me..*/.#|define k|
|00001030| 43 6f 6d 70 69 6c 65 57 | 69 74 68 43 47 49 73 63 |CompileW|ithCGIsc|
|00001040| 72 69 70 74 5f 6e 61 6d | 65 09 09 31 0d 2f 2a 20 |ript_nam|e..1./* |
|00001050| 27 63 74 79 70 27 20 63 | 6f 6e 74 65 6e 74 5f 74 |'ctyp' c|ontent_t|
|00001060| 79 70 65 09 09 2a 2f 0d | 23 64 65 66 69 6e 65 20 |ype..*/.|#define |
|00001070| 6b 43 6f 6d 70 69 6c 65 | 57 69 74 68 43 47 49 63 |kCompile|WithCGIc|
|00001080| 6f 6e 74 65 6e 74 5f 74 | 79 70 65 09 09 31 0d 2f |ontent_t|ype..1./|
|00001090| 2a 20 27 72 65 66 72 27 | 20 72 65 66 65 72 65 72 |* 'refr'| referer|
|000010a0| 09 09 09 2a 2f 0d 23 64 | 65 66 69 6e 65 20 6b 43 |...*/.#d|efine kC|
|000010b0| 6f 6d 70 69 6c 65 57 69 | 74 68 43 47 49 72 65 66 |ompileWi|thCGIref|
|000010c0| 65 72 65 72 09 09 09 31 | 0d 2f 2a 20 27 41 67 6e |erer...1|./* 'Agn|
|000010d0| 74 27 20 75 73 65 72 5f | 61 67 65 6e 74 09 09 2a |t' user_|agent..*|
|000010e0| 2f 0d 23 64 65 66 69 6e | 65 20 6b 43 6f 6d 70 69 |/.#defin|e kCompi|
|000010f0| 6c 65 57 69 74 68 43 47 | 49 75 73 65 72 5f 61 67 |leWithCG|Iuser_ag|
|00001100| 65 6e 74 09 09 31 0d 2f | 2a 20 27 4b 63 69 70 27 |ent..1./|* 'Kcip'|
|00001110| 20 63 6c 69 65 6e 74 5f | 69 70 09 09 09 2a 2f 0d | client_|ip...*/.|
|00001120| 23 64 65 66 69 6e 65 20 | 6b 43 6f 6d 70 69 6c 65 |#define |kCompile|
|00001130| 57 69 74 68 43 47 49 63 | 6c 69 65 6e 74 5f 69 70 |WithCGIc|lient_ip|
|00001140| 09 09 31 0d 2f 2a 20 27 | 4b 66 72 71 27 20 66 75 |..1./* '|Kfrq' fu|
|00001150| 6c 6c 5f 72 65 71 75 65 | 73 74 09 09 2a 2f 0d 23 |ll_reque|st..*/.#|
|00001160| 64 65 66 69 6e 65 20 6b | 43 6f 6d 70 69 6c 65 57 |define k|CompileW|
|00001170| 69 74 68 43 47 49 66 75 | 6c 6c 5f 72 65 71 75 65 |ithCGIfu|ll_reque|
|00001180| 73 74 09 09 31 0d 2f 2a | 20 27 50 76 72 73 27 20 |st..1./*| 'Pvrs' |
|00001190| 76 65 72 73 69 6f 6e 09 | 09 09 2a 2f 0d 23 64 65 |version.|..*/.#de|
|000011a0| 66 69 6e 65 20 6b 43 6f | 6d 70 69 6c 65 57 69 74 |fine kCo|mpileWit|
|000011b0| 68 43 47 49 76 65 72 73 | 69 6f 6e 09 09 09 31 0d |hCGIvers|ion...1.|
|000011c0| 0d 0d 2f 2a 2a 20 20 49 | 6e 74 65 72 66 61 63 65 |../** I|nterface|
|000011d0| 20 20 2a 2a 2f 0d 0d 2f | 2a 20 73 65 74 74 69 6e | **/../|* settin|
|000011e0| 67 20 74 68 69 73 20 74 | 6f 20 6f 66 66 20 77 69 |g this t|o off wi|
|000011f0| 6c 6c 20 63 72 65 61 74 | 65 20 61 20 62 61 63 6b |ll creat|e a back|
|00001200| 67 72 6f 75 6e 64 20 6f | 6e 6c 79 20 61 70 70 6c |ground o|nly appl|
|00001210| 69 63 61 74 69 6f 6e 20 | 77 69 74 68 0d 09 6e 6f |ication |with..no|
|00001220| 20 75 73 65 72 20 69 6e | 74 65 72 66 61 63 65 2e | user in|terface.|
|00001230| 20 54 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | The app|lication|
|00001240| 20 77 6f 6e 27 74 20 73 | 68 6f 77 20 75 70 20 69 | won't s|how up i|
|00001250| 6e 20 74 68 65 0d 09 61 | 70 70 6c 69 63 61 74 69 |n the..a|pplicati|
|00001260| 6f 6e 20 6d 65 6e 75 2e | 20 2a 2f 0d 23 64 65 66 |on menu.| */.#def|
|00001270| 69 6e 65 20 6b 43 6f 6d | 70 69 6c 65 57 69 74 68 |ine kCom|pileWith|
|00001280| 46 6f 72 65 67 72 6f 75 | 6e 64 09 09 09 31 0d 23 |Foregrou|nd...1.#|
|00001290| 69 66 20 6b 43 6f 6d 70 | 69 6c 65 57 69 74 68 46 |if kComp|ileWithF|
|000012a0| 6f 72 65 67 72 6f 75 6e | 64 20 2f 2a 20 6f 6e 6c |oregroun|d /* onl|
|000012b0| 79 20 61 6c 6c 6f 77 20 | 74 68 65 20 6f 70 74 69 |y allow |the opti|
|000012c0| 6f 6e 73 20 62 65 6c 6f | 77 20 69 66 20 66 6f 72 |ons belo|w if for|
|000012d0| 65 67 72 6f 75 6e 64 20 | 2a 2f 0d 0d 2f 2a 20 73 |eground |*/../* s|
|000012e0| 65 74 74 69 6e 67 20 74 | 68 69 73 20 6f 6e 20 77 |etting t|his on w|
|000012f0| 69 6c 6c 20 61 6c 6c 6f | 77 20 75 73 65 72 20 69 |ill allo|w user i|
|00001300| 6e 74 65 72 66 61 63 65 | 20 65 6c 65 6d 65 6e 74 |nterface| element|
|00001310| 73 20 73 75 63 68 20 61 | 73 20 65 72 72 6f 72 20 |s such a|s error |
|00001320| 0d 09 64 69 61 6c 6f 67 | 73 20 74 6f 20 70 6f 70 |..dialog|s to pop|
|00001330| 20 75 70 2e 20 54 75 72 | 6e 20 69 74 20 6f 66 66 | up. Tur|n it off|
|00001340| 20 69 66 20 79 6f 75 20 | 77 61 6e 74 20 74 68 65 | if you |want the|
|00001350| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 74 6f 20 | applica|tion to |
|00001360| 62 65 20 61 62 6c 65 0d | 09 74 6f 20 72 75 6e 20 |be able.|.to run |
|00001370| 77 69 74 68 6f 75 74 20 | 72 65 71 75 69 72 69 6e |without |requirin|
|00001380| 67 20 61 6e 79 20 75 73 | 65 72 20 69 6e 74 65 72 |g any us|er inter|
|00001390| 61 63 74 69 6f 6e 2e 20 | 55 73 65 72 20 69 6e 74 |action. |User int|
|000013a0| 65 72 66 61 63 65 20 65 | 6c 65 6d 65 6e 74 73 0d |erface e|lements.|
|000013b0| 09 73 75 63 68 20 61 73 | 20 6d 65 6e 75 73 20 77 |.such as| menus w|
|000013c0| 69 6c 6c 20 73 74 69 6c | 6c 20 62 65 20 61 76 61 |ill stil|l be ava|
|000013d0| 69 6c 61 62 6c 65 20 28 | 70 72 6f 76 69 64 69 6e |ilable (|providin|
|000013e0| 67 20 43 6f 6d 70 69 6c | 65 57 69 74 68 46 6f 72 |g Compil|eWithFor|
|000013f0| 65 67 72 6f 75 6e 64 0d | 09 69 73 20 6f 6e 29 2e |eground.|.is on).|
|00001400| 20 2a 2f 0d 23 64 65 66 | 69 6e 65 09 6b 43 6f 6d | */.#def|ine.kCom|
|00001410| 70 69 6c 65 57 69 74 68 | 46 75 6c 6c 55 73 65 72 |pileWith|FullUser|
|00001420| 49 6e 74 65 72 66 61 63 | 65 09 30 09 0d 2f 2a 20 |Interfac|e.0../* |
|00001430| 64 69 73 70 6c 61 79 20 | 74 68 65 20 73 70 6c 61 |display |the spla|
|00001440| 73 68 20 73 63 72 65 65 | 6e 20 6f 6e 20 73 74 61 |sh scree|n on sta|
|00001450| 72 74 75 70 20 2a 2f 0d | 23 64 65 66 69 6e 65 20 |rtup */.|#define |
|00001460| 6b 43 6f 6d 70 69 6c 65 | 57 69 74 68 53 70 6c 61 |kCompile|WithSpla|
|00001470| 73 68 53 63 72 65 65 6e | 09 09 30 0d 2f 2a 20 61 |shScreen|..0./* a|
|00001480| 70 70 6c 69 63 61 74 69 | 6f 6e 20 75 73 65 73 20 |pplicati|on uses |
|00001490| 6d 6f 64 65 6c 65 73 73 | 20 64 69 61 6c 6f 67 73 |modeless| dialogs|
|000014a0| 20 2a 2f 0d 23 64 65 66 | 69 6e 65 20 6b 43 6f 6d | */.#def|ine kCom|
|000014b0| 70 69 6c 65 57 69 74 68 | 4d 6f 64 65 6c 65 73 73 |pileWith|Modeless|
|000014c0| 44 69 61 6c 6f 67 73 09 | 09 30 0d 2f 2a 20 61 70 |Dialogs.|.0./* ap|
|000014d0| 70 6c 69 63 61 74 69 6f | 6e 20 75 73 65 73 20 63 |plicatio|n uses c|
|000014e0| 75 73 74 6f 6d 20 77 69 | 6e 64 6f 77 73 20 2a 2f |ustom wi|ndows */|
|000014f0| 0d 23 64 65 66 69 6e 65 | 20 6b 43 6f 6d 70 69 6c |.#define| kCompil|
|00001500| 65 57 69 74 68 41 70 70 | 6c 69 63 61 74 69 6f 6e |eWithApp|lication|
|00001510| 57 69 6e 64 6f 77 73 09 | 30 0d 2f 2a 20 61 70 70 |Windows.|0./* app|
|00001520| 6c 69 63 61 74 69 6f 6e | 20 68 61 6e 64 6c 65 73 |lication| handles|
|00001530| 20 63 75 73 74 6f 6d 20 | 6b 65 79 62 6f 61 72 64 | custom |keyboard|
|00001540| 20 65 6e 74 72 79 20 2a | 2f 0d 23 64 65 66 69 6e | entry *|/.#defin|
|00001550| 65 20 6b 43 6f 6d 70 69 | 6c 65 57 69 74 68 4b 65 |e kCompi|leWithKe|
|00001560| 79 62 6f 61 72 64 45 76 | 65 6e 74 73 09 09 30 0d |yboardEv|ents..0.|
|00001570| 2f 2a 20 73 75 70 70 6f | 72 74 20 64 72 61 67 20 |/* suppo|rt drag |
|00001580| 61 6e 64 20 64 72 6f 70 | 20 6d 61 6e 61 67 65 72 |and drop| manager|
|00001590| 20 2a 2f 0d 23 64 65 66 | 69 6e 65 20 6b 43 6f 6d | */.#def|ine kCom|
|000015a0| 70 69 6c 65 57 69 74 68 | 44 72 61 67 4e 44 72 6f |pileWith|DragNDro|
|000015b0| 70 09 09 09 30 0d 0d 23 | 65 6e 64 69 66 20 2f 2a |p...0..#|endif /*|
|000015c0| 20 6b 43 6f 6d 70 69 6c | 65 57 69 74 68 46 6f 72 | kCompil|eWithFor|
|000015d0| 65 67 72 6f 75 6e 64 20 | 2a 2f 0d 0d 0d 2f 2a 2a |eground |*/.../**|
|000015e0| 2a 20 20 50 52 4f 43 45 | 53 53 20 2f 20 41 50 50 |* PROCE|SS / APP|
|000015f0| 4c 49 43 41 54 49 4f 4e | 20 20 2a 2a 2a 2f 0d 0d |LICATION| ***/..|
|00001600| 2f 2a 20 49 66 20 74 68 | 69 73 20 69 73 20 64 65 |/* If th|is is de|
|00001610| 66 69 6e 65 64 2c 20 74 | 68 65 20 61 70 70 6c 69 |fined, t|he appli|
|00001620| 63 61 74 69 6f 6e 20 77 | 69 6c 6c 20 68 61 76 65 |cation w|ill have|
|00001630| 20 61 20 67 6c 6f 62 61 | 6c 20 27 67 50 72 6f 63 | a globa|l 'gProc|
|00001640| 65 73 73 46 53 53 70 65 | 63 27 0d 09 74 68 61 74 |essFSSpe|c'..that|
|00001650| 20 69 73 20 61 75 74 6f | 6d 61 74 69 63 61 6c 6c | is auto|maticall|
|00001660| 79 2c 20 64 75 72 69 6e | 67 20 73 74 61 72 74 75 |y, durin|g startu|
|00001670| 70 2c 20 73 65 74 20 74 | 6f 20 62 65 20 74 68 65 |p, set t|o be the|
|00001680| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 27 73 0d 09 | applica|tion's..|
|00001690| 66 69 6c 65 20 73 70 65 | 63 2e 20 2a 2f 0d 23 64 |file spe|c. */.#d|
|000016a0| 65 66 69 6e 65 20 6b 43 | 6f 6d 70 69 6c 65 57 69 |efine kC|ompileWi|
|000016b0| 74 68 50 72 6f 63 65 73 | 73 46 69 6c 65 53 70 65 |thProces|sFileSpe|
|000016c0| 63 09 09 31 0d 2f 2a 20 | a5 6e 65 77 a5 20 64 65 |c..1./* |.new. de|
|000016d0| 66 61 75 6c 74 20 73 65 | 74 74 69 6e 67 20 66 6f |fault se|tting fo|
|000016e0| 72 20 74 68 65 20 73 6c | 65 65 70 20 74 69 6d 65 |r the sl|eep time|
|000016f0| 20 70 61 73 73 65 64 20 | 74 6f 20 66 75 6e 63 74 | passed |to funct|
|00001700| 69 6f 6e 73 20 73 75 63 | 68 20 61 73 0d 09 57 61 |ions suc|h as..Wa|
|00001710| 69 74 4e 65 78 74 45 76 | 65 6e 74 20 2a 2f 0d 23 |itNextEv|ent */.#|
|00001720| 64 65 66 69 6e 65 20 6b | 53 6c 65 65 70 54 69 63 |define k|SleepTic|
|00001730| 6b 73 09 09 09 09 09 09 | 28 32 20 2a 20 6b 4f 6e |ks......|(2 * kOn|
|00001740| 65 53 65 63 6f 6e 64 49 | 6e 54 69 63 6b 73 29 0d |eSecondI|nTicks).|
|00001750| 2f 2a 20 a5 6e 65 77 a5 | 20 64 65 66 61 75 6c 74 |/* .new.| default|
|00001760| 20 73 65 74 74 69 6e 67 | 20 66 6f 72 20 74 68 65 | setting| for the|
|00001770| 20 73 6c 65 65 70 20 74 | 69 6d 65 20 70 61 73 73 | sleep t|ime pass|
|00001780| 65 64 20 74 6f 20 66 75 | 6e 63 74 69 6f 6e 73 20 |ed to fu|nctions |
|00001790| 73 75 63 68 20 61 73 0d | 09 57 61 69 74 4e 65 78 |such as.|.WaitNex|
|000017a0| 74 45 76 65 6e 74 20 77 | 68 65 6e 20 74 68 65 72 |tEvent w|hen ther|
|000017b0| 65 20 61 72 65 20 74 68 | 72 65 61 64 73 20 74 6f |e are th|reads to|
|000017c0| 20 70 72 6f 63 65 73 73 | 20 2a 2f 0d 23 64 65 66 | process| */.#def|
|000017d0| 69 6e 65 20 6b 53 6c 65 | 65 70 54 69 63 6b 73 57 |ine kSle|epTicksW|
|000017e0| 68 65 6e 42 75 73 79 09 | 09 09 09 35 0d 0d 0d 2f |henBusy.|...5.../|
|000017f0| 2a 2a 2a 20 20 4d 45 4d | 4f 52 59 20 43 4f 4e 46 |*** MEM|ORY CONF|
|00001800| 49 47 55 52 41 54 49 4f | 4e 20 20 2a 2a 2a 2f 0d |IGURATIO|N ***/.|
|00001810| 0d 2f 2a 20 59 6f 75 20 | 77 69 6c 6c 20 6e 65 65 |./* You |will nee|
|00001820| 64 20 74 6f 20 65 73 74 | 69 6d 61 74 65 20 79 6f |d to est|imate yo|
|00001830| 75 72 20 6d 65 6d 6f 72 | 79 20 72 65 71 75 69 72 |ur memor|y requir|
|00001840| 65 6d 65 6e 74 73 20 68 | 65 72 65 20 2a 2f 0d 0d |ements h|ere */..|
|00001850| 2f 2a 20 27 63 6f 6d 66 | 6f 72 74 27 20 7a 6f 6e |/* 'comf|ort' zon|
|00001860| 65 20 6f 66 20 66 72 65 | 65 20 6d 65 6d 6f 72 79 |e of fre|e memory|
|00001870| 2e 20 54 68 69 73 20 6d | 75 73 74 20 62 65 20 62 |. This m|ust be b|
|00001880| 69 67 20 65 6e 6f 75 67 | 68 20 74 6f 20 61 6c 6c |ig enoug|h to all|
|00001890| 6f 77 0d 09 61 6e 79 20 | 65 73 73 65 6e 74 69 61 |ow..any |essentia|
|000018a0| 6c 20 66 75 6e 63 74 69 | 6f 6e 73 20 74 6f 20 62 |l functi|ons to b|
|000018b0| 65 20 63 61 6c 6c 65 64 | 2e 0d 09 54 68 69 73 20 |e called|...This |
|000018c0| 69 73 20 75 73 65 64 20 | 61 73 20 61 6e 20 27 65 |is used |as an 'e|
|000018d0| 6d 65 72 67 65 6e 63 79 | 27 20 72 65 73 65 72 76 |mergency|' reserv|
|000018e0| 65 20 6f 66 20 6d 65 6d | 6f 72 79 20 74 6f 20 62 |e of mem|ory to b|
|000018f0| 65 0d 09 64 65 61 6c 6c | 6f 63 61 74 65 64 20 69 |e..deall|ocated i|
|00001900| 66 20 73 65 72 69 6f 75 | 73 6c 79 20 6e 65 65 64 |f seriou|sly need|
|00001910| 65 64 2e 0d 09 4e 61 6d | 65 64 20 6b 4d 65 6d 43 |ed...Nam|ed kMemC|
|00001920| 75 73 68 69 6f 6e 20 69 | 6e 20 49 4d 2d 4d 65 6d |ushion i|n IM-Mem|
|00001930| 6f 72 79 3a 20 31 2d 34 | 33 2c 20 31 2d 33 36 20 |ory: 1-4|3, 1-36 |
|00001940| 2a 2f 0d 23 64 65 66 69 | 6e 65 20 6b 4d 65 6d 43 |*/.#defi|ne kMemC|
|00001950| 75 73 68 69 6f 6e 53 69 | 7a 65 09 09 09 38 31 39 |ushionSi|ze...819|
|00001960| 32 4c 20 2f 2a 20 38 6b | 20 2a 2f 0d 2f 2a 20 66 |2L /* 8k| */./* f|
|00001970| 6f 72 20 70 72 65 2d 61 | 6c 6c 6f 63 61 74 69 6f |or pre-a|llocatio|
|00001980| 6e 20 6f 66 20 6d 61 73 | 74 65 72 20 70 6f 69 6e |n of mas|ter poin|
|00001990| 74 65 72 73 2e 0d 09 55 | 73 65 64 20 69 6e 20 69 |ters...U|sed in i|
|000019a0| 6e 69 74 41 70 70 4d 65 | 6d 6f 72 79 20 22 4d 61 |nitAppMe|mory "Ma|
|000019b0| 69 6e 2e 63 22 0d 09 49 | 4d 2d 4d 65 6d 6f 72 79 |in.c"..I|M-Memory|
|000019c0| 3a 20 31 2d 34 32 20 2a | 2f 0d 23 64 65 66 69 6e |: 1-42 *|/.#defin|
|000019d0| 65 09 6b 4d 6f 72 65 4d | 61 73 74 65 72 43 61 6c |e.kMoreM|asterCal|
|000019e0| 6c 73 09 09 34 0d 2f 2a | 20 6d 69 6e 69 6d 75 6d |ls..4./*| minimum|
|000019f0| 20 66 72 65 65 20 73 70 | 61 63 65 20 6e 65 65 64 | free sp|ace need|
|00001a00| 65 64 20 28 69 6e 20 62 | 79 74 65 73 29 20 66 6f |ed (in b|ytes) fo|
|00001a10| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 74 6f |r applic|ation to|
|00001a20| 20 62 65 20 61 62 6c 65 | 20 74 6f 20 72 75 6e 2e | be able| to run.|
|00001a30| 0d 09 53 68 6f 75 6c 64 | 20 70 72 6f 62 61 62 6c |..Should| probabl|
|00001a40| 79 20 62 65 20 61 20 6d | 75 6c 74 69 70 6c 65 20 |y be a m|ultiple |
|00001a50| 6f 66 20 31 30 32 34 2e | 0d 09 53 68 6f 75 6c 64 |of 1024.|..Should|
|00001a60| 20 62 65 20 62 69 67 67 | 65 72 20 74 68 61 6e 20 | be bigg|er than |
|00001a70| 6b 4d 65 6d 43 68 75 73 | 69 6f 6e 53 69 7a 65 20 |kMemChus|ionSize |
|00001a80| 2a 2f 0d 23 64 65 66 69 | 6e 65 20 6b 4d 69 6e 53 |*/.#defi|ne kMinS|
|00001a90| 65 67 53 69 7a 65 09 09 | 09 09 33 32 37 36 38 4c |egSize..|..32768L|
|00001aa0| 20 2f 2a 20 33 32 6b 20 | 2a 2f 0d 0d 0d 2f 2a 2a | /* 32k |*/.../**|
|00001ab0| 20 20 70 72 6f 66 69 6c | 65 72 20 73 75 70 70 6f | profil|er suppo|
|00001ac0| 72 74 20 20 2a 2a 2f 0d | 0d 2f 2a 20 6d 61 78 20 |rt **/.|./* max |
|00001ad0| 32 31 20 63 68 61 72 73 | 20 69 6e 20 6c 65 6e 67 |21 chars| in leng|
|00001ae0| 74 68 2e 0d 09 45 6e 64 | 20 72 65 73 75 6c 74 20 |th...End| result |
|00001af0| 77 69 6c 6c 20 62 65 20 | 73 6f 6d 65 74 68 69 6e |will be |somethin|
|00001b00| 67 20 6c 69 6b 65 20 22 | 5c 70 3c 6e 61 6d 65 3e |g like "|\p<name>|
|00001b10| 2d 36 38 4b 2e 70 72 6f | 66 22 20 6f 72 20 22 2e |-68K.pro|f" or ".|
|00001b20| 2e 2e 2d 50 50 43 2e 70 | 72 6f 66 22 20 2a 2f 0d |..-PPC.p|rof" */.|
|00001b30| 23 64 65 66 69 6e 65 20 | 6b 50 72 6f 66 69 6c 65 |#define |kProfile|
|00001b40| 4e 61 6d 65 53 74 72 09 | 09 09 22 63 67 69 22 0d |NameStr.|.."cgi".|
|00001b50| 0d 2f 2a 2a 20 20 44 65 | 62 62 75 67 67 69 6e 67 |./** De|bbugging|
|00001b60| 20 53 75 70 70 6f 72 74 | 20 20 2a 2a 2f 0d 0d 2f | Support| **/../|
|00001b70| 2a 20 69 66 20 79 6f 75 | 20 61 72 65 20 64 65 62 |* if you| are deb|
|00001b80| 75 67 67 69 6e 67 20 79 | 6f 75 72 20 63 6f 64 65 |ugging y|our code|
|00001b90| 2c 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 73 65 74 |, you sh|ould set|
|00001ba0| 20 61 73 73 65 72 74 69 | 6f 6e 73 20 6f 6e 20 28 | asserti|ons on (|
|00001bb0| 31 29 2e 0d 09 49 66 20 | 79 6f 75 20 61 72 65 20 |1)...If |you are |
|00001bc0| 73 68 69 70 70 69 6e 67 | 20 79 6f 75 72 20 61 70 |shipping| your ap|
|00001bd0| 70 6c 69 63 61 74 69 6f | 6e 2c 20 79 6f 75 20 73 |plicatio|n, you s|
|00001be0| 68 6f 75 6c 64 20 74 75 | 72 6e 20 61 73 73 65 72 |hould tu|rn asser|
|00001bf0| 74 69 6f 6e 73 20 6f 66 | 66 20 28 30 29 2e 20 2a |tions of|f (0). *|
|00001c00| 2f 0d 23 64 65 66 69 6e | 65 20 6b 43 6f 6d 70 69 |/.#defin|e kCompi|
|00001c10| 6c 65 57 69 74 68 41 73 | 73 65 72 74 69 6f 6e 73 |leWithAs|sertions|
|00001c20| 09 31 0d 0d 0d 2f 2a 2a | 2a 20 20 45 4f 46 20 20 |.1.../**|* EOF |
|00001c30| 2a 2a 2a 2f 0d 00 00 00 | 00 00 00 00 00 00 00 00 |***/....|........|
|00001c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c80| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00001c90| 73 6b 20 3c 3c 20 67 65 | 73 74 61 6c 74 48 61 73 |sk << ge|staltHas|
|00001ca0| 43 6f 6c 6f 72 29 29 20 | 21 3d 20 6e 69 6c 29 20 |Color)) |!= nil) |
|00001cb0| 11 4d 79 43 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e |.MyConfi|guration|
|00001cc0| 2e 68 02 00 00 00 54 45 | 58 54 43 57 49 45 00 06 |.h....TE|XTCWIE..|
|00001cd0| 00 00 54 45 58 54 43 57 | 49 45 00 06 00 00 00 00 |..TEXTCW|IE......|
|00001ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cf0| 00 00 ac 77 59 a4 00 00 | 00 00 00 00 01 9a 6b 44 |...wY...|......kD|
|00001d00| 72 61 77 20 2a 2f 0d 0d | 0d 23 70 72 61 67 6d 61 |raw */..|.#pragma|
|00001d10| 20 6d 61 72 6b 20 2d 0d | 0d 2f 2a 20 44 65 74 65 | mark -.|./* Dete|
|00001d20| 72 6d 69 6e 65 20 69 66 | 20 61 20 74 72 61 70 20 |rmine if| a trap |
|00001d30| 69 73 20 61 76 61 69 6c | 61 62 6c 65 20 2a 2f 0d |is avail|able */.|
|00001d40| 42 6f 6f 6c 65 61 6e 0d | 73 74 61 72 74 75 70 54 |Boolean.|startupT|
|00001d50| 72 61 70 41 76 61 69 6c | 61 62 6c 65 20 28 20 75 |rapAvail|able ( u|
|00001d60| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 20 74 72 61 |nsigned |long tra|
|00001d70| 70 20 29 0d 7b 0d 09 55 | 6e 69 76 65 72 73 61 6c |p ).{..U|niversal|
|00001d80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00001d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001da0| 00 00 00 00 00 00 00 03 | 00 04 00 7b 00 70 01 c1 |........|...{.p..|
|00001db0| 02 4f 00 7b 00 70 01 c1 | 02 4f ad 2d ee 4b 00 00 |.O.{.p..|.O.-.K..|
|00001dc0| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 00 04 |........|........|
|00001dd0| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00001de0| 00 00 00 46 00 39 b4 c8 | 1d 04 00 00 00 1c 00 46 |...F.9..|.......F|
|00001df0| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00001e00| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00001e10| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|00001e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+